package me.sdevil507.supports.global.config;

import com.querydsl.sql.SQLQueryFactory;
import com.querydsl.sql.SQLTemplates;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

/**
 * SQLQueryFactory配置
 *
 */
@Configuration
public class SQLQueryDslConfiguration {
    @Bean
    public SQLQueryFactory sqlQuery(DataSource dataSource){
        return new SQLQueryFactory(new com.querydsl.sql.Configuration(SQLTemplates.DEFAULT), dataSource);
    }
}
